<template>
    <div class="container">
        <div class="channel-detail">
            <header>
                <router-link to="/">首页 / </router-link>
                <router-link to="/partner/channel">推荐机构管理 / </router-link>
                {{id?info.coreData.companyName:'添加'}}
            </header>
            <div v-if="messageList.length > 0" class="focus-pointer mb30">
                <div class="flex-box-align" style="padding-left: 18px; position: relative; width: 100%;">
                    今日要事：
                    <div class="message">
                        <ul class="marquee_list" :style="{ top: -num + 'px'}" :class="{marquee_top:num}">
                            <li v-for="(item, index) in messageList" :key="index" v-if="messageList && messageList.length">
                                <router-link :to="{name: item.route}">{{item.showMsg}}</router-link>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>

            <div class="detail-display">
                <div class="flex-box-align head-sec">
                    <div class="flex">基础信息</div>
                </div>
                <div style="padding-top: 30px;">
                    <div>
                    <div class="info-edit">
                        <el-form :model="information" :rules="rules" ref="information" >
                            <div class="edit-title">基础信息 <div @click="()=>{this.editState = false}"  v-if="editState" class="edit-btn">编辑</div></div>
                            <el-form-item prop="companyName">
                                <div class="edit-list ">
                                    <div class="name">企业名称：</div>
                                    <div v-if="!editState" class="edit-value input">
                                        <el-input v-model="information.companyName" placeholder="请输入内容"></el-input>
                                    </div>
                                    <div class="name-value" v-if="editState">{{information.companyName}}</div>
                                </div>
                            </el-form-item>
                            <el-form-item prop="fundBody">
                                <div class="edit-list">
                                    <div class="name">推荐机构类型：</div>
                                    <div v-if="!editState" class="edit-value">
                                        <el-select filterable v-model="information.fundBody" clearable placeholder="请选择">
                                            <el-option
                                            v-for="item in bodyArr"
                                            :key="item.key"
                                            :label="item.value"
                                            :value="item.key">
                                            </el-option>
                                        </el-select>
                                    </div>
                                    <div v-if="editState" class="name-value" >{{info.channelBaseData?returnType(info.channelBaseData.fundBody):''}}</div>
                                </div> 
                            </el-form-item>
                            <el-form-item prop="regdate">
                                <div class="edit-list">
                                    <div class="name">注册成立日期：</div>
                                    <div v-if="!editState" class="edit-value input">
                                    <el-date-picker
                                        v-model="information.regdate"
                                        type="date"
                                        placeholder="选择日期"
                                        format="yyyy 年 MM 月 dd 日"
                                        value-format="yyyy-MM-dd">
                                        </el-date-picker>
                                    </div>
                                    <div class="name-value" v-if="editState">{{information.regdate?information.regdate.split(' ')[0]:''}}</div>
                                </div>
                            </el-form-item>
                            <el-form-item prop="masterName">
                                <div class="edit-list ">
                                    <div class="name">推荐机构法人代表：</div>
                                    <div v-if="!editState" class="edit-value input">
                                        <el-input v-model="information.masterName" placeholder="请输入内容"></el-input>
                                    </div>
                                    <div class="name-value" v-if="editState">{{info.channelBaseData&&info.channelBaseData.masterName?info.channelBaseData.masterName:''}}</div>
                                </div>
                            </el-form-item>
                            <el-form-item prop="regMoney">
                                <div class="edit-list ">
                                    <div class="name">推荐机构注册资本：</div>
                                    <div v-if="!editState" class="edit-value input">
                                        <el-input class="regMoney-input" v-model="information.regMoney" placeholder="请输入内容"></el-input>元
                                    </div>
                                    <div class="name-value" v-if="editState">{{info.channelBaseData&&info.channelBaseData.regMoney?info.channelBaseData.regMoney+'元':''}}</div>
                                </div>
                            </el-form-item>
                            <el-form-item prop="contactName">
                                <div class="edit-list ">
                                    <div class="name">推荐机构联系人：</div>
                                    <div v-if="!editState" class="edit-value input">
                                        <el-input v-model="information.contactName" placeholder="请输入内容"></el-input>
                                    </div>
                                    <div class="name-value" v-if="editState">{{info.channelBaseData&&info.channelBaseData.contactName?info.channelBaseData.contactName:''}}</div>
                                </div>
                            </el-form-item>
                            <el-form-item prop="contactPhone">
                                <div class="edit-list ">
                                    <div class="name">联系方式：</div>
                                    <div v-if="!editState" class="edit-value input">
                                        <el-input v-model="information.contactPhone" placeholder="请输入内容"></el-input>
                                    </div>
                                    <div class="name-value" v-if="editState">{{info.channelBaseData&&info.channelBaseData.contactPhone ?info.channelBaseData.contactPhone :''}}</div>
                                </div>
                            </el-form-item>
                            <el-form-item class="province-address" prop="provinceCode">
                                <div class="edit-list address ">
                                    <div class="name">推荐机构联系地址：</div>
                                    <div v-if="!editState" class="edit-value">
                                        <el-select filterable v-model="information.provinceCode"  @change="provinceChange" clearable placeholder="请选择">
                                            <el-option
                                            v-for="item in addressArr"
                                            :key="item.key"
                                            :label="item.value"
                                            :value="item.key">
                                            </el-option>
                                        </el-select>
                                        <el-select filterable v-model="information.cityCode" @change="cityChange" clearable placeholder="请选择">
                                        <el-option
                                            v-for="item in cityArr"
                                            :key="item.key"
                                            :label="item.value"
                                            :value="item.key">
                                            </el-option>
                                        </el-select>
                                        <el-select filterable v-model="information.districtCode" clearable placeholder="请选择">
                                            <el-option
                                            v-for="item in districtArr"
                                            :key="item.key"
                                            :label="item.value"
                                            :value="item.key">
                                            </el-option>
                                        </el-select>
                                        <el-input class="address-detail" v-model="information.address"></el-input>
                                    </div>
                                    <div v-if="editState" class="name-value" >{{info.channelBaseData&&info.channelBaseData.provinceName?info.channelBaseData.provinceName:''}}{{info.channelBaseData&&info.channelBaseData.cityName?'-'+info.channelBaseData.cityName:''}}{{info.channelBaseData&&info.channelBaseData.districtName?'-'+info.channelBaseData.districtName:''}}{{info.channelBaseData&&info.channelBaseData.address?'-'+info.channelBaseData.address:''}}</div>
                                </div>
                            </el-form-item>
                            <el-form-item class="introduce-detail" prop="memo">
                                <div class="edit-list">
                                    <div class="name">推荐机构介绍：</div>
                                    <div v-if="!editState" class="edit-value input">
                                    <el-input
                                            type="textarea"
                                            :rows="5"
                                            placeholder="请输入内容"
                                            v-model="information.memo">
                                            </el-input>
                                    </div>
                                    <div class="name-value" v-if="editState">{{info.channelBaseData&&info.channelBaseData.memo ?info.channelBaseData.memo :''}}</div>
                                </div>
                            </el-form-item>
                            <el-form-item class="lince-image" prop="licenceId">
                                <div class="edit-list image">
                                    <div class="name">营业执照复印件：</div>
                                    <div v-if="!editState" class="edit-value">
                                        <div class="add-image">
                                            <el-upload  list-type="picture-card" class="normal-uploader" 
                                                :class="{uploadShow:uploadShow}"
                                                :action="upLoadUrl"    
                                                :on-success="handleFileSuccess"   
                                                :file-list='fileShowList'
                                                :limit='10'
                                                :on-remove="handleRemove">   
                                                <i class="el-icon-plus"></i> 
                                            </el-upload>  
                                        </div>
                                    </div>
                                    <div  v-if="editState" class="edit-img">
                                        <img :src="info.licenceData&&info.licenceData.licenceFileInfo?info.licenceData.licenceFileInfo.fileUrl:''" alt="">
                                    </div>
                                </div>
                            </el-form-item>
                            <el-form-item prop="unifiedCreditNumber">
                                <div class="edit-list">
                                    <div class="name">社会统一信用号：</div>
                                    <div v-if="!editState" class="edit-value input">
                                        <el-input v-model="information.unifiedCreditNumber" placeholder="请输入内容"></el-input>
                                    </div>
                                    <div class="name-value" v-if="editState">{{information.unifiedCreditNumber}}</div>
                                </div>
                            </el-form-item>
                        </el-form>
                        <div v-if="id" class="edit-list chanel">
                            <div class="name">推荐机构码：</div>
                            <div class="edit-value text">{{info.coreData&&info.coreData.channelCode}}</div>
                        </div>       
                    </div>
                 <div  v-if="!editState" @click="submitBtn('information')" class="btn-submit">提交</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
    import {parseUrlParams} from "../../util";
    let CONSTANT = require('../../constant/constant.js'),
        common = require('../../common.js');

    export default {
        data() {
            var validateCode =  (rule, value, callback) => {
                if (!common.checkSocialCreditCode(value)) return callback(new Error('社会统一信用号输入不合法'))
                return callback();
            };
            var validateNum =  (rule, value, callback) => { 
                console.log(isNaN(value),value)
                if (isNaN(value)){ return callback(new Error('请输入数字')); }
                var reg= /^(-?\d+)(\.\d{1,2})?$/
                if (!reg.test(value)){ return callback(new Error('请保留两位小数')); }
                callback();
            };
            return {
                formLabelWidth:'120',
                province: "",
                editState:true,
                city: "",
                district: "",
                id:'',
                detail: {},            
                info:'',
                fileShowList:[],
                uploadUrl:'',
                addressArr:[],
                cityArr:[],
                districtArr:[],
                uploadShow:false,
                information:{
                    companyName:'',
                    fundBody:'',
                    address:'',
                    regdate:'',
                    provinceCode:'',
                    cityCode:'',
                    districtCode:"",
                    memo:'',
                    unifiedCreditNumber :'',
                    licenceId:'',
                    masterName:'',
                    regMoney:'',
                    contactName:'',
                    contactPhone:''
                },
                num: 0,
                messageList: [],
                bodyArr:[],
                rules:{
                    companyName: [
                        { required: true, message: '请输入企业名称', trigger: 'blur' }
                    ],
                    fundBody: [
                        { required: true, message: '请选择推荐机构类型', trigger: 'blur' }
                    ],
                    regdate: [
                        { required: true, message: '请输入注册成立日期', trigger: 'blur' }
                    ],
                    masterName: [
                        { required: true, message: '请输入推荐机构法人代表', trigger: 'blur' }
                    ],
                    regMoney: [
                        { required: true, message: '请输入推荐机构注册资本', trigger: 'blur' },
                        {  validator: validateNum, trigger: 'blur' }
                    ],
                    contactName: [
                        { required: true, message: '请输入推荐机构联系人', trigger: 'blur' }
                    ],
                    contactPhone: [
                        { required: true, message: '请输入联系方式', trigger: 'blur' }
                    ],
                    provinceCode: [
                        { required: true, message: '请选择推荐机构联系地址', trigger: 'blur' }
                    ],
                    memo: [
                        { required: true, message: '请输入推荐机构介绍', trigger: 'blur' }
                    ],
                    unifiedCreditNumber: [
                        { required: true, message: '请输入社会统一信用号', trigger: 'blur' },
                        {  validator: validateCode, trigger: 'blur' }
                    ],
                    licenceId: [
                        { required: true, message: '请上传营业执照复印件', trigger: 'blur' }
                    ],
                },
            }
        },
        created(){
            this.id = parseUrlParams("id")
        },
        mounted(){
            
            if(!parseUrlParams("id")){
                this.editState = false
            }
            this.getDictionary("channel_type", (data) => {
                this.bodyArr = data.data.bussData
            })
             let sessionId = common.getCookie('sessionId');
            this.upLoadUrl = CONSTANT.URL.SYS.ADMINUPLOAD+ '?sessionId='+sessionId;

            this.getMessage()
            setInterval( () => {
                this.getMessage()
            }, 120000)
            if(this.id){
                this.getDetail()
            }else{
                this.getProvince()
            }
        },
        methods:{
            returnType(id){
                let str;
                this.bodyArr.map((item)=>{
                    if(item.key == id){
                        str = item.value
                    }
                })
                return str;
            },
            getDictionary(params, callback) {
                let url = CONSTANT.URL.SYS.LOADDICTIONARY;
                common.requestAjax(url, {codeType: params}, {}, callback);
            },
            getMessage() {
                let url = CONSTANT.URL.CALENDAR.MESSAGELIST;
                common.requestAjax(url, {}, {}, (data) => {
                    if(data.status == 200) {
                        this.messageList = data.data.bussData;
                        this.showMarquee(this.num)
                    }
                })
            },
            getDetail() {
                let url = CONSTANT.URL.COMPANY.COMPANYBASEDETAIL;
                common.requestAjax(url, {}, {userId: parseUrlParams("id")}, (res) => {
                        if (res.status == 200) {
                            this.info= res.data.bussData;
                            let data = res.data.bussData;
                        // if()
                        
                        this.information = {
                            companyName:data.coreData.companyName,
                            regdate:data.coreData.regdate,
                            provinceCode:data.channelBaseData?data.channelBaseData.provinceCode:'' ,
                            cityCode:data.channelBaseData?data.channelBaseData.cityCode:'',
                            districtCode:data.channelBaseData?data.channelBaseData.districtCode:'',
                            licenceId:data.licenceData?data.licenceData.licenceFileId:'',
                            unifiedCreditNumber:data.licenceData?data.licenceData.unifiedCreditNumber:'',
                            licenceFileId:data.licenceData?data.licenceData.runRegAddress:'',
                            memo:data.channelBaseData?data.channelBaseData.memo:'',
                            address:data.channelBaseData?data.channelBaseData.address:'',
                            fundBody:data.channelBaseData?data.channelBaseData.fundBody:'',
                            masterName:data.channelBaseData?data.channelBaseData.masterName:'',
                            regMoney:data.channelBaseData?data.channelBaseData.regMoney:'',
                            contactName:data.channelBaseData?data.channelBaseData.contactName:'',
                            contactPhone:data.channelBaseData?data.channelBaseData.contactPhone:'',
                        }
                        if(data.licenceData){
                            this.fileShowList.push({
                                url:data.licenceData.licenceFileInfo.fileUrl
                            })
                        }
                           
                        this.getProvince()
                    }
                })
            },
            getProvince(){
                this.getDictionary("province", (data) => {
                    this.addressArr= data.data.bussData
                    if(!this.information.provinceCode)return
                    this.addressArr.map((item)=>{
                        if(this.information.provinceCode == item.key){
                            this.cityArr = item.childs
                            if(!this.information.cityCode)return
                            item.childs.map((list)=>{
                                if(this.information.cityCode == list.key){
                                    this.districtArr = list.childs
                                }
                            })
                        }
                    })
                })
            },
            provinceChange(e){
                this.information.regCityCode = ''
                this.cityArr = [];
                this.districtArr = []
                this.information.regDistrictCode = ''
                this.addressArr.map((item)=>{
                    if(e== item.key){
                        this.cityArr = item.childs
                    }
                })
            },
            cityChange(e){
                this.districtArr = []
                this.information.regDistrictCode = ''
                this.cityArr.map((item)=>{
                    if(e == item.key){
                        this.districtArr = item.childs
                    }
                })
            },
            handleRemove(file, fileList) {      // 图片上传
                let deleteUrl = file.url;
                this.uploadShow = false;
                this.information.licenceId = '';
            },       
            handleFileSuccess(res, file) {
                if(res.status == 200){
                    let picItem = res.data.bussData;
                    this.information.licenceId = picItem.fileId;
                    this.uploadShow = true;
                }
            },
            handleClickCommit() {
                let url = CONSTANT.URL.COMPANY.SAVEBASEDETAIL;
                let params = {
                    coreData: {
                        companyName:this.coreData.companyName,
                        regdate: this.coreData.regdate,
                        regMoney: this.coreData.regMoney
                    },
                    licenceData: {
                        regProvinceCode: this.coreData.province,
                        regCityCode: this.coreData.city,
                        regDistrictCode: this.coreData.district,
                        runProvinceCode: this.coreData.runProvince,
                        runRegCityCode: this.coreData.runCity,
                        runRegDistrictCode: this.coreData.runDistrict
                    },
                    userId:parseUrlParams("id")
                }
                common.requestAjax(url, JSON.stringify(params), {}, (data) => {
                    if (data.status == 200) {
                        this.$message({
                            message: data.msg,
                            type: 'success'
                        })
                        this.getDetail()

                    }
                })
                
            },
            submitBtn(formName){
                 this.$refs[formName].validate((valid) => {
                    if (valid) {
                        let  url =CONSTANT.URL.COMPANY.SAVEBASEDETAIL,
                        data = {
                            "coreData": {
                                "companyName":this.information.companyName ,
                                "userType": 'channel',
                                "regdate": this.information.regdate,
                            },
                            "licenceData": {
                                "unifiedCreditNumber":  this.information.unifiedCreditNumber,
                                'licenceFileId':this.information.licenceId
                            },
                            'channelBaseData':{
                                'address':this.information.address,
                                'fundBody':this.information.fundBody,
                                "cityCode": this.information.cityCode,
                                "districtCode": this.information.districtCode,
                                "provinceCode": this.information.provinceCode,
                                "memo":this.information.memo,
                                "masterName":this.information.masterName,
                                "regMoney":this.information.regMoney,
                                "contactName":this.information.contactName,
                                "contactPhone":this.information.contactPhone,
                            },
                            "userId":parseUrlParams("id")?parseUrlParams("id"):''
                        
                        }
                        common.requestAjax(url, JSON.stringify(data), {}, (data) => {
                            if (data.status == 200) {
                                this.$message({
                                    message: data.msg,
                                    type: 'success'
                                })
                                if(this.id){
                                    this.editState = true
                                    this.getDetail()
                                }else{
                                    this.$router.push("/partner/channel");
                                }

                            }
                        },(data)=>{
                            this.$message({
                                type: 'warning',
                                message:data.msg
                            });
                        })
                    }
                 })
                
            },
            showMarquee:function (num) {
                if (!this.messageList[0]) return
                this.messageList.push(this.messageList[0]);
                var max = this.messageList.length;
                var that = this;
                let marqueetimer =  setInterval(function(){
                    num++;
                    if(num>=max ){
                        num=0;
                    }
                    that.num=num*30;
                }, 2000);
            }
        }
    }
</script>

<style lang="scss">
    .message {
        display: block;
        position: relative;
        width: 60%;
        height: 30px;/*关键样式*/
        overflow: hidden;
    }
    .marquee_list{
        display: block;
        position: absolute;
        top:0;
        left: 0;
    }
    .marquee_top{transition: top 0.5s ;}/*关键样式*/
    .marquee_list li{
        height: 30px;/*关键样式*/
        line-height: 30px;/*关键样式*/
        font-size: 14px;
        padding-left: 20px;
        background-color: #fff;
        a {
            color: #333;
        }
    }
    .btn-submit{
            margin: 50px 0 0 30%;
            width: 140px;
            height: 40px;
            border-radius: 4px;
            -webkit-border-radius: 4px;
            background-color: #ED7018;
            font-size: 16px;
            color: #fff;
            text-align: center;
            line-height: 40px;
            cursor: pointer;
            &:hover{
                background-color: #ED9000;
                transition:all .2s linear
            }
        }
        .info-edit{
            padding-top: 31px;
             .el-form-item{
                margin-bottom: 0PX;
            }
            .el-form-item__error {
                top: 71%;
                left: 14%;
            }
            .lince-image{
                .el-form-item__error {
                    top: 93%;
                }
            }
            .province-address{
                .el-form-item__error {
                    top: 88%;
                }
            }

             .introduce-detail{
                .el-form-item__error {
                    top: 88%;
                }
            }
            
            .edit-title{
                position: relative;
                font-size: 16px;
                color: #333;
                font-weight: bold;
                padding-left: 16px;
                margin-bottom: 28px;
                    .edit-btn{
                        display: inline-block;
                        float: right;
                        width: 80px;
                        height: 30px;
                        margin-right: 20px;
                        background-color: #ED7018;
                        border-radius: 4px;
                        -webkit-border-radius: 4px;
                        font-size: 14px;
                        color: #fff;
                        text-align: center;
                        line-height: 30px;
                        cursor: pointer;
                        &:hover{
                            background-color: #ED9000;
                            transition:all .2s linear
                        } 
                    }
                &:after{
                    content: '';
                    position: absolute;
                    left: 0;
                    top: 2px;
                    width: 3px;
                    height: 17px;
                    background-color: #ED7018;
                }
            }
            .edit-list{
                overflow: hidden;
                margin-bottom: 24px;
                .name{
                    float: left;
                    width: 12%;
                    text-align: right;
                    font-size: 14px;
                    color: #666;
                    margin-right: 15px;
                    height: 40px;
                    line-height: 40px;
                }

                .name-value{
                    float: left;
                    width: 80%;
                    text-align: left;
                    font-size: 14px;
                    color: #666;
                    margin-right: 15px;
                    height: 40px;
                    line-height: 40px;
                }

                .regMoney-input{
                    width: 350px;
                    margin-right: 20px;
                }
                
                .address-detail{
                    display: block;
                    width: 384px;
                    margin-top: 20px;
                }

                    .edit-img{
                        
                        img{
                            width: 306px;
                            height: 227px;
                            border: 0;
                        }
                    }

                &.line{
                    .el-select{
                    margin-right: 10px;
                    width: 185px;
                    margin-right: 10px;
                    }
                }
                &.image{
                    .edit-value{
                        float: none;
                        .add-image{
                            margin-left: 170px;
                            margin-top: 50px;
                        }
                    } 
                }
                &.address{
                    .el-select{
                    margin-right: 16px;
                    width: 115px;
                    }
                }
                &.chanel{
                    .el-select{
                    width: 384px;
                    } 
                }
                &.register{
                    .el-select{
                    margin-right: 10px;
                    width: 87px;
                    }
                    .address-input{
                        width: 422px;
                    }
                }
    
                &.introduce{
                    margin-bottom: 0;
                    .title-item{
                        overflow: hidden;
                        font-size: 14px;
                        color: #666;
                        height: 40px;
                        line-height: 40px;
                        .title-list{
                            float: left;
                            width: 87px;
                            margin-right: 10px;
                        }
                    }
                    .el-input{
                        margin-right: 10px;
                        width: 87px;
                    }
                    .address-input{
                        display: inline-block;
                    }
                    .address-input{
                        width: 422px;
                    
                    }
                }
                .edit-value{
                    position: relative;
                    float: left;
                    font-size: 14px;
                    color: #333;
                    .el-textarea{
                        margin-top: 10px;
                    }
                    .el-icon-plus{
                        width: 306px;
                        height: 227px;
                        background: url('../../images/upload-default.png');
                        background-size: 100%;
                        &:before{
                            content: ''
                        }
                    }
                    .btn-add{
                            position: absolute;
                            right: -80px;
                            width: 73px;
                            height: 40px;
                            bottom: 25px;
                            // margin-left: 41px;
                            // margin-top: 30px;
                            background-color: #ED7018;
                            border-radius: 4px;
                            -webkit-border-radius: 4px;
                            font-size: 14px;
                            color: #fff;
                            text-align: center;
                            line-height: 40px;
                            cursor: pointer;
                            &:hover{
                                background-color: #ED9000;
                                transition:all .2s linear
                            } 
                        }
                    .el-upload--picture-card{
                        width: 306px;
                        height: 227px;
                        border: 0;
                    }
                    .el-upload-list__item{
                        width: 306px;
                        height: 227px;
                    }
                    
                    &.text{
                        height: 40px;
                        line-height: 40px;
                    }
                    &.input{
                        width: 384px;
                            .el-date-editor{
                                width: 384px;
                                input{
                                    padding-left: 30px;
                                }
                            }
                    }
                    .add-image{
                        width: 306px;
                        height: 227px;
                    }
                }
            }
        }
    .container {
        .mb30 {
            margin-bottom: 30px;
        }
        .whiteSpace {
            white-space: nowrap;
        }
        .channel-detail {
                header {
                    margin: 19px 0;
                    font-size: 14px;
                    color: #333;
                    a {
                        color: #999;
                    }
                }
                
                .focus-pointer {
                    font-size: 14px;
                    height: 70px;
                    line-height: 70px;
                    background-color: #fff;
                    padding-left: 18px;
                    white-space: nowrap;
                }
                .detail-display {
                    background-color: #fff;
                    padding: 23px;
                    .head-sec {
                        padding-bottom: 8px;
                        border-bottom: 1px solid #e1e1e1;
                    }
                    .el-form-item{
                        margin-bottom: 0;
                    }
                }
                .top-manager {
                    margin-bottom: 20px;
                    span {
                        width: 80px;
                        display: inline-block;
                    }
                }
                .channel-edit {
                    .el-input {
                        width: 300px;
                    }
                }
            }
        .avatar-uploader .el-upload {
            border: 1px dashed #d9d9d9;
            border-radius: 6px;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }
        .avatar-uploader .el-upload:hover {
            border-color: #409EFF;
        }
        .avatar-uploader-icon {
            font-size: 28px;
            color: #8c939d;
            width: 178px;
            height: 178px;
            line-height: 178px;
            text-align: center;
        }
        .avatar {
            width: 178px;
            height: 178px;
            display: block;
        }
    }
</style>
